package com.classicmodels.model;

public class Customer {

    static void NuevoCliente(String customer[]) {
        Customer cliente = new Customer();
        int customerNumber = Integer.parseInt(customer[0]);
        int salesRepEmployeeNumber = Integer.parseInt(customer[10]);
        int creditLimit = Integer.parseInt(customer[11]);
        cliente.setCustomerNumber(customerNumber);
        cliente.setCustomerName(customer[1]);
        cliente.setContactLastName(customer[2]);
        cliente.setContactFirstName(customer[3]);
        cliente.setAdressLine1(customer[4]);
        cliente.setAdressLine2(customer[5]);
        cliente.setCity(customer[6]);
        cliente.setState(customer[7]);
        cliente.setPostalCode(customer[8]);
        cliente.setCountry(customer[9]);
        cliente.setSalesRepEmployeeNumber(salesRepEmployeeNumber);
        cliente.setCreditLimit(creditLimit);
    }

    private int customerNumber;
    private String customerName;
    private String contactLastName;
    private String contactFirstName;

    private String adressLine1;
    private String adressLine2;
    private String phone;
    private String city;
    private String state;
    private String postalCode;
    private String country;

    private int salesRepEmployeeNumber;
    private int creditLimit;

public static String[] getVectorAtributesNames(){
    String[] arrayAtributos = new String[13];
        
    arrayAtributos[0] = "customerNumber";
    arrayAtributos[1]= "customerName";
    arrayAtributos[2]= "contactLastName";
    arrayAtributos[3]= "contactFirstName";

    arrayAtributos[4]= "phone";
    arrayAtributos[5]= "adressLine1";
    arrayAtributos[6]= "adressLine2";
    arrayAtributos[7]= "city";
    arrayAtributos[8]= "state";
    arrayAtributos[9]= "postalCode";
    arrayAtributos[10]= "country";

    arrayAtributos[11]="salesRepEmployeeNumber";
    arrayAtributos[12]="creditLimit";
        
    return arrayAtributos;
    }
    
    //Metodo que devuelve un vector con todos los datos del Customer
    public Object[] getVectorCustomerData(){
    Object[] arrayDatos = new Object[13];
        
    arrayDatos[0] = customerNumber;
    arrayDatos[1]= customerName;
    arrayDatos[2]= contactLastName;
    arrayDatos[3]= contactFirstName;

    arrayDatos[4]= phone;
    arrayDatos[5]= adressLine1;
    arrayDatos[6]= adressLine2;
    arrayDatos[7]= city;
    arrayDatos[8]= state;
    arrayDatos[9]= postalCode;
    arrayDatos[10]= country;

    arrayDatos[11]= salesRepEmployeeNumber;
    arrayDatos[12]= creditLimit;
        
    return arrayDatos;
    }
   
    




 
    
    public int getCustomerNumber() {
        return customerNumber;
    }

    
    public void setCustomerNumber(int customerNumber) {
        this.customerNumber = customerNumber;
    }

    
    public String getCustomerName() {
        return customerName;
    }

    
    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    
    public String getContactLastName() {
        return contactLastName;
    }

    
    public void setContactLastName(String contactLastName) {
        this.contactLastName = contactLastName;
    }

    
    public String getContactFirstName() {
        return contactFirstName;
    }

    
    public void setContactFirstName(String contactFirstName) {
        this.contactFirstName = contactFirstName;
    }

    
    public String getAdressLine1() {
        return adressLine1;
    }

    
    public void setAdressLine1(String adressLine1) {
        this.adressLine1 = adressLine1;
    }

    
    public String getAdressLine2() {
        return adressLine2;
    }

    
    public void setAdressLine2(String adressLine2) {
        this.adressLine2 = adressLine2;
    }

    
    public String getCity() {
        return city;
    }

    
    public void setCity(String city) {
        this.city = city;
    }

    
    public String getState() {
        return state;
    }

    
    public void setState(String state) {
        this.state = state;
    }

    
    public String getPostalCode() {
        return postalCode;
    }

    
    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    
    public String getCountry() {
        return country;
    }

    
    public void setCountry(String country) {
        this.country = country;
    }

    
    public int getSalesRepEmployeeNumber() {
        return salesRepEmployeeNumber;
    }

    
    public void setSalesRepEmployeeNumber(int salesRepEmployeeNumber) {
        this.salesRepEmployeeNumber = salesRepEmployeeNumber;
    }

    
    public int getCreditLimit() {
        return creditLimit;
    }

    
    public void setCreditLimit(int creditLimit) {
        this.creditLimit = creditLimit;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }
}